<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <link rel="shortcut icon" href="/favicon.ico"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8">
    <title>登录页面</title>
    <style>
        body {
            background-color: #F5F6F8;
        }

        .loginF {
            margin: 120px auto 0;
            width: 380px;
            height: 450px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 10px 10px 20px 10px #E1E2E4
        }

        tr {
            color: #C6C6C6;
            font-weight: lighter;
            width: 400px;
            display: block;
            height: 40px;
            line-height: 40px;
        }

        input {
            width: 260px;
            height: 30px;
            line-height: 30px;
            border:0px;
            outline:none;
            padding-left: 25px;
            box-sizing: border-box;
        }

        input:-webkit-autofill {
            box-shadow: 0 0 0px 1000px rgba(255,255,255,1) inset !important;
            -webkit-background-clip:text;
        }

        .ui-input {
            border-bottom: solid 1px #C6C6C6
        }

        .focus {
            border-bottom: solid 1px #4381e6
        }


        .box {
            position: relative;
        }

        .icon-user {
            position: absolute;
            left: 62px;
            top: 10px;
            background: url("/l-user.png") center;
            background-size: 21px 23px;
            width: 21px;
            height: 23px;
        }


        .icon-lock {
            position: absolute;
            left: 60px;
            top: 10px;
            background: url("/l-lock.png") center;
            background-size: 22px 22px;
            width: 22px;
            height: 22px;
        }

    </style>
</head>
<body onload="loadTopWindow()">

<div style="">
    <form action="/sso/login" method="post" class="loginF">
        <table style="display:block;margin: 0 auto;">
            <tr style="margin-top: 50px;">
                <td  style="text-align: center;color: #4381e6; font-size: 30px;width: 360px;font-family: monospace">
                    <img src="/favicon.ico" style="width: 28px; height: 28px;border-style: none;vertical-align: middle;">
                    <span style="vertical-align: middle;font-weight:bolder;">SSO账号登录</span>
                </td>
            </tr>
            <tr>
                <td >
                    <input name="webapp" type="hidden" th:value="${webapp}"/>
                </td>
            </tr>
            <tr style="margin-top: 10px">
                <td  style="padding-left: 60px" class="box">
                    <i class="icon-user"></i>
                    <input name="username" type="text" placeholder="请输入用户名" class="ui-input"/>
                </td>
            </tr>
            <tr style="margin-top: 10px;">
                <td  style="padding-left: 60px" class="box">
                    <i class="icon-lock"></i>
                    <input name="password" type="password" placeholder="请输入密码" class="ui-input"/>
                </td>
            </tr>
            <tr>
                <td  style="text-align: center;width: 400px;padding-top: 20px;">
                    <span style="color:#FF3B30" th:text="${msg}"></span>
                </td>
            </tr>
            <tr style="margin-top: 30px;">
                <td  style="width: 380px;" align="center">
                    <input value="登录" type="submit" style="display:block;width: 300px;height: 40px;line-height: 40px;border-radius: 10px;color: #fff;background-image: linear-gradient(to left,#4381e6,#11C1E6);border: 0px;padding: 0px;"/>
                </td>
            </tr>
        </table>
    </form>
</div>

<script  type="text/javascript">
    function loadTopWindow() {
        var message = self.location.href;
        window.parent.postMessage(message,'*');
    }
    var input = document.querySelectorAll('.ui-input');
    input.forEach(function(val, i) {
        val.onfocus = function() {
            this.className = ' focus';
        }
        val.onblur = function() {
            this.className = ' ui-input';
        }
    });
</script>
</body>
</html>